from pydantic import BaseModel, Field
from typing import List, Optional
from enum import Enum


class Role(Enum):
    COMMON = 'common'
    ADMIN = 'admin'


class User(BaseModel):
    username: str
    screen_name: str
    role: str
    description: Optional[str]
    token: Optional[str]


class UserInDb(User):
    hashed_pwd: str
